using System;
using System.Collections.Generic;
using System.Text;

namespace TuMama
{
    [Serializable]
    public class Jugador
    {
        public enum status
        {
            ready,
            notReady
        }
        private double score;
        private string nombreJugador;
        private string userName;
        private string password;
        private status estado;
        private int idJugador;
        private int ronda;

        [NonSerialized()] private ClientInfo clientInfo;

        public Jugador()
        {
            this.Score = 0;
            this.nombreJugador = String.Empty;
            this.userName = String.Empty;
            this.password = String.Empty;
            this.idJugador = 0;
            this.estado = status.notReady;
        }

        public Jugador(string nombre, string pwd, double sco, string un)
        {
            this.nombreJugador = nombre;
            this.password = pwd;
            this.score = sco;
            this.userName = un;
        }

        public int Ronda
        {
            get 
            {
                return this.ronda;
            }
            set 
            {
                this.ronda = value;
            }
        }

        public double Score
        {
            get
            {
                return score;
            }
            set
            {
                this.score = value;
            }
        }
        public status Estado
        {
            get 
            {
                return this.estado;
            }
            set
            {
                this.estado = value;
            }
        }

        public string NombreJugador
        {
            get
            {
                return this.nombreJugador;
            }
            set
            {
                this.nombreJugador = value;
            }
        }

        public string UserName
        {
            get
            {
                return this.userName;
            }
            set
            {
                this.userName = value;
            }
        }

        public string Password
        {
            get
            {
                return this.password;
            }
            set
            {
                this.password = value;
            }
        }

        public int IdJugador
        {
            get
            {
                return this.idJugador;
            }
            set
            {
                this.idJugador = value;
            }
        }

        public ClientInfo ClientInfo
        {
            get
            {
                return this.clientInfo;
            }
            set
            {
                this.clientInfo = value;
            }
        }


        public override string ToString()
        {
            return String.Format("[Nombre: {0} , Score: {1}, UserName: {2}, Password: {3} ]", this.NombreJugador, this.Score, this.UserName, this.Password);
        }
    }
}
